
package harlequin;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;

public class GeneralSection extends JFrame{
    public Connection connector;
    public String section;
    public String professor;
    public String tempDate;
    public String date;

    public int setter;
    
public boolean SectionExsists(String section) throws SQLException{
   
    String query = "select * from section";
   PreparedStatement preparedStatement = connector.prepareStatement(query);
   ResultSet set = preparedStatement.executeQuery(query);
    
    
    while(set.next()){
        if(set.getString("courseSection").equals(section) || set.getString("courseSection").contentEquals(section)) 
            return true;
    }
    
    return false;
}
    
}
